// TODO: CODE REVIEW & CLEANUP!
//
// McDvd.xaml.cs
//

using System;
using System.Windows.Controls;
using HomeUX.ClientControlSupport;
using HomeUX.Synchronization;

namespace HomeUX.ClientApp
{

public partial class McDvd : UserControl, IDisposable
{
    ISyncClient _syncClient;

    public McDvd()
    {
        InitializeComponent();
        _syncClient = ClientControlSupport.ClientGlobals.GetSyncClient(this);
        _syncClient.IsOnlineChanged += _syncClient_IsOnlineChanged;
    }

    public void Dispose()
    {
        _syncClient.IsOnlineChanged -= _syncClient_IsOnlineChanged;
    }

    void _syncClient_IsOnlineChanged(object sender, IsOnlineChangedEventArgs e)
    {
        MoreButton.IsEnabled = e.IsOnline;
    }

    private void MoreButton_Click(object sender, System.Windows.RoutedEventArgs e)
    {
        ClientUtil.ShowDialog(this, new McDvdMore(), null);
    }
}

}

